package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 工序工单派单人员对象 main_process_order_users_approve
 *
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_process_order_users_approve")
public class ProcessOrderUsersApprove extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 派工ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工单Id")
    private Long workId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工单人员表Id")
    private Long wuId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "开工令Id")
    private Long projectId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工序名称")
    private String processName;

    @ApiModelProperty(value = "原工时")
    private BigDecimal workHours;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "原工价")
    private BigDecimal workCost;

    @ApiModelProperty(value = "调整后工时")
    private BigDecimal newWorkHours;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "调整后工价")
    private BigDecimal newWorkCost;

    @ApiModelProperty(value = "调整原因")
    private String requestReason;

    @ApiModelProperty(value = "状态（0-已提交,1-已拒绝 2同意）")
    private Integer status;

    @ApiModelProperty(value = "提交人")
    private Long submitUserId;

    @ApiModelProperty(value = "审核人")
    private Long approveUserId;

    @ApiModelProperty(value = "审核人")
    private LocalDateTime approveTime;
}
